#ifndef SHADEWIDGET_H
#define SHADEWIDGET_H

#include <QMainWindow>
#include <QWidget>
#include <QHBoxLayout>
#include <QListWidget>
#include <QMenu>
#include <QMenuBar>
#include <QTextEdit>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QDebug>
#include <QCursor>
#include <QPushButton>
#include <QWidget>
#include <QCloseEvent>
#include <QtDebug>
#include <QApplication>
#include <QPixmap>
#include <QDesktopWidget>
#include <QDesktopServices>
#include <QClipboard>
#include <QMainWindow>
#include <QMenu>//右键菜单
#include <QMouseEvent>
#include <QPainter>//画笔
#include <QDebug>
#include <QFileDialog>
#include <QShowEvent>
#include <QMessageBox>

class Shadewidget : public QMainWindow
{

public:
    explicit Shadewidget(QMainWindow *parent = nullptr);
    ~Shadewidget();
private slots:
    void closeEvent(QCloseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void keyPressEvent(QKeyEvent *event);
    void paintEvent(QPaintEvent */*event*/);
    void copy(bool hideflag);//将截图复制到粘贴板
    void save();//截图另存为

private:
//    Ui::Shadewidget *ui;
    QPixmap screen;        //截屏图片
    QPoint start_point;
    QPoint end_point;
    int x,y,w,h;
    QMainWindow* parent;

    QMenu *menu;

    QWidget* centralWidget;
};

#endif // SHADEWIDGET_H
